cmake_minimum_required(VERSION 3.10)
project(MyGame)

set(CMAKE_CXX_STANDARD 17)

# 包含src目录下的所有源文件
file(GLOB SOURCES "src/*.cpp")

# 创建可执行文件
add_executable(mygame ${SOURCES})

# 链接库
target_link_libraries(mygame raylib)

# 设置运行时输出目录为项目根目录
# 这样运行时，程序能正确找到 assets/fonts/
set_target_properties(mygame PROPERTIES 
    RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}
)